<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>项目使用情况</title>
	<%@ include file="/WEB-INF/include/include.jsp" %>
	<script type="text/javascript" src="<%=path %>/js/rms/projectuse/projectuseList.js"></script>
	<style type="text/css">
		.listpage-content2 {margin:25px 10px 20px; padding: 0 0 10;background-color: #FFF;z-index:1; }
		.listpage-grid {
			width: 100%;z-index:1;background-color: #FFF;margin: 0 0 10;padding: 0 0 0;
		}
		
	</style>
  </head>
  <body>
  		<div class="listpage-locked-content">
			<h2 class="listpage-lk-title" >项目使用情况</h2>
		</div>
		
		<div class="listpage-content2">
			<div class="listpage-grid" id="tbarWrap"></div>
			<div class="listpage-grid" id="gridWrap"></div>
		</div>
		
  </body>
</html>

	<ui:page>

  	<ui:model name="GrildProjectuseModel">
  		 <x:attr name="fields" type="array">
  		
  			<ui:model.field name="id" ></ui:model.field>
  			<ui:model.field name="projectname" ></ui:model.field>
  			<ui:model.field name="hostname"></ui:model.field>
  			<ui:model.field name="week" ></ui:model.field>
  	        <ui:model.field name="cpuavg"></ui:model.field>
  		
  			<ui:model.field name="cpupeak"></ui:model.field>
  			<ui:model.field name="memoryavg"></ui:model.field>
  			<ui:model.field name="memorypeak"></ui:model.field>
  			<ui:model.field name="diskuse"></ui:model.field>
  			
  		</x:attr>
  	</ui:model>
<ui:formPanel renderTo="tbarWrap" >
		<x:attr name="border" type="int">0</x:attr>
		<x:attr name="bodyPadding"  type="int" >5</x:attr>
		<x:attr name="fieldDefaults">
			<x:value>
				<x:attr name="labelAlign"  type="string" >right</x:attr>
			</x:value>
		</x:attr>
    <x:items>
    	<x:value>
				<x:attr name="layout">column</x:attr>
				<x:attr name="border" type="int" >0</x:attr>
				<x:attr name="bodyPadding"  type="int" >5</x:attr>
				<x:attr name="items" type="array">
					<ui:formPanel.number id="cpuavg1" config="true" fieldLabel="cpu平均值低值" width="205" value="10"  labelWidth="95" ></ui:formPanel.number>
	   				<ui:formPanel.number id="cpuavg2" config="true" fieldLabel="cpu平均值高值" width="205" value="80"  labelWidth="95" ></ui:formPanel.number>
	  				<ui:formPanel.number id="cpupeak" config="true" fieldLabel="cpu峰值" width="205" value="95"  labelWidth="95" ></ui:formPanel.number>
				</x:attr>
		</x:value>
    	<x:value>
				<x:attr name="layout">column</x:attr>
				<x:attr name="border" type="int" >0</x:attr>
				<x:attr name="bodyPadding"  type="int" >5</x:attr>
				<x:attr name="items" type="array">
					   <ui:formPanel.number id="monavg1" config="true" fieldLabel="内存平均值低值" width="205" value="10"  labelWidth="95" ></ui:formPanel.number>
					   <ui:formPanel.number id="monavg2" config="true" fieldLabel="内存平均值高值" width="205" value="80"  labelWidth="95" ></ui:formPanel.number>
					   <ui:formPanel.number id="monpeak" config="true" fieldLabel="内存峰值" width="205" value="90"  labelWidth="95" ></ui:formPanel.number>
					   <ui:button handler="ProjectuseList.setThreshold" text="设置" iconCls="icon-search" scope="ProjectuseList"></ui:button>
	   			</x:attr>
		</x:value>    
    
    

	   

   </x:items>
</ui:formPanel>
	
	
	
	<ui:grid id="projectuseGrid" showCheckbox="false"  
		datasetName="ProjectuseDatasetHandler" 
		handlerName="ProjectuseQueryHandler" 
		model="GrildProjectuseModel" renderTo="gridWrap"  >
		<x:columns>
			
		    <ui:gridcolumn text="id" dataIndex="id" hidden="true"/>
			<ui:gridcolumn text="项目名称" dataIndex="projectname" />
			<ui:gridcolumn text="主机名称" dataIndex="hostname" />
			<ui:gridcolumn text="周次" dataIndex="week" hidden="true"/>
			<ui:gridcolumn text="cpu平均值(%)" dataIndex="cpuavg" renderer="ProjectuseList.statuscpuaRender" ></ui:gridcolumn>
			<ui:gridcolumn text="cpu峰值(%)" dataIndex="cpupeak" renderer="ProjectuseList.statuscpupRender" />
            <ui:gridcolumn text="内存平均值(%)" dataIndex="memoryavg" renderer="ProjectuseList.statusmonaRender" />
            <ui:gridcolumn text="内存峰值(%)" dataIndex="memorypeak" renderer="ProjectuseList.statusmonpRender" />
            <ui:gridcolumn text="硬盘(%)" dataIndex="diskuse" renderer="ProjectuseList.statusdisRender"/>

		</x:columns>
				
	</ui:grid>

	
	</ui:page>

	
